Đăng nhập Đăng ký

while statement câu

"while statement" là gì  
Câu ví dụĐiện thoại
  • Using a while statement, we can write a countdown program:
    Dùng câu lệnh while, ta có thể viết lại countdown:
  • Using a while statement, we can rewrite countdown:
    Dùng câu lệnh while, ta có thể viết lại countdown:
  • It is more like a while statement, except that it tests the condition at the end of the loop body.
    Giống lệnh while, ngoại trừ ở điểm là nó kiểm tra điều kiện ở cuối thân vòng lặp.
  • It is more like a while statement, except that it tests the condition at the end of the loop body.
    Giống lệnh While, ngoại trừ ở điểm là nó kiểm tra điều kiện ở cuối thân vòng lặp.
  • Like a while statement, except that it tests the condition at the end of the loop body.
    Giống lệnh while, ngoại trừ ở điểm là nó kiểm tra điều kiện ở cuối thân vòng lặp.
  • In this example, you can use the while statement to calculate the Fibonacci sequence up to 100:
    Trong ví dụ dưới đây, bạn có thể dùng cấu trúc while để tính chuỗi Fibonacci đến 100:
  • Like a while statement, except that it tests the condition at the end of the loop body.
    Giống lệnh While, ngoại trừ ở điểm là nó kiểm tra điều kiện ở cuối thân vòng lặp.
  • The while statement will execute a block of code if and as long as a test expression is true.
    Câu lệnh while sẽ thực thi một khối mã nếu và miễn là một biểu thức kiểm tra là đúng.
  • If Pj has set flag [j] to true and is also executing in its while statement, then either turn == i or turn == j.
    Nếu Pj đặt flag[j] là true và nó cũng đang thực thi trong câu lệnh while của nó thì turn == i hay turn == j.
  • If its value is true (using Perl's notion of truth), the body of the while statement is evaluated once.
    Nếu giá trị này là đúng (bằng việc dùng ý tưởng về cái đúng của câu lệnh if), thì thân của câu lệnh while sẽ được tính một lần.
  • Hence, one of the processes - say, Pj -must have successfully executed the while statement, whereas Pi had to execute at least one additional statement ("turn== j").
    Do đó, một trong các quá trình-Pj phải được thực thi thành công câu lệnh while, ngược lại Pi phải thực thi ít nhất câu lệnh bổ sung (“turn==j”).
  • You can almost read the while statement like English: “While n is greater than zero, print the value of n and then reduce the value of n by 1.
    Bạn gần như có thể đọc lệnh while giống cách đọc tiếng Anh: “Khi n còn lớn hơn 0, hãy hiển thị giá trị của n rồi giảm giá trị của n đi 1.
  • Thus, since Pi does not change the value of the variable turn while executing the while statement, Pi will enter the critical section (progress) after at most one entry by Pj (bounded waiting).
    Do đó, vì Pi không thay đổi giá trị của biến turn trong khi thực thi câu lệnh while, nên Pi sẽ đi vào miền tương trục (tiến trình) sau khi nhiều nhất chỉ Pj đi vào (chờ có giới hạn).
  • The while statement is used to carry out looping operations, in which a group of statements is executed repeatedly , until some condition has been satisfied.
    Câu lệnh while được dùng để thực hiện thao tác có tính lặp vòng quanh, trong đó một nhóm các câu lệnh được thực thi lặp lại nhiều lần đến khi một điều kiện nào đó được thỏa mãn.
  • while     Is it common for people in America to be packing one of these while on...
  • statement     I need you to look over the Antarctica statement again. Em muốn anh xem lại...